(function(){
	var wx = $('#wx');
	var wxCode = $('#footer-wxcode');
	var goTopArea = $(".gotop_area");
	var goTop = $("#goTop");
	var window_ = $(window);
	var wHeight = window_.height();
	var fixShow_ = false;

	goTop.bind('click', function(){window_.scrollTop(0);});
	window_.scroll(function(e){
	    if (!fixShow_) {
	        if (window_.scrollTop() >= wHeight) {
	            goTopArea.css({"visibility":"visible"});
	            fixShow_ = true;
	        }
	    } else {
	        if (window_.scrollTop() < wHeight) {
	            goTopArea.css({"visibility":"hidden"});
	            fixShow_ = false;
	        }
	    }
	});
	wx.bind("hover", function(){
	    if (wxCode.is(':visible')) {
	        wxCode.hide();
	    } else {
	        wxCode.show();
	    }
	});
})()